{config_load file=global.conf}
{config_load file="_Tracks.conf" section="`$lang`"}
{config_load file="_form_calc_result.conf" section="`$lang`"}

{*-----------------------------------------------------------------------------------------------*}
{literal}
<script type="text/javascript">
<!--

     function emptyFunc() {
     }

     function showStrobber() {
          //document.getElementById('strobber').style.display='block';
          xajax.$('strobber').style.display='block';
     }

     function hideStrobber() {
          //document.getElementById('strobber').style.display='none';
          xajax.$('strobber').style.display='none';
     }

     function afterBodyLoaded(){
          xajax.loadingFunction = showStrobber;
          xajax.doneLoadingFunction = hideStrobber;
          //xajax.loadingFunction = showLoadingMessage;
          //xajax.doneLoadingFunction = hideLoadingMessage;
     }

     addLoadEvent(afterBodyLoaded);
// -->
</script>
{/literal}
{*-----------------------------------------------------------------------------------------------*}
<script src="{#scripts_dir#}/script.aculo.us/lib/prototype.js" type="text/javascript"></script>
<script src="{#scripts_dir#}/script.aculo.us/src/scriptaculous.js" type="text/javascript"></script>
<script src="{#scripts_dir#}/script.aculo.us/src/unittest.js" type="text/javascript"></script>


<link href="{#styles_dir#}/loading.css" rel="stylesheet" type="text/css">


{*-----------------------------------------------------------------------------------------------*}
{assign var="access" value="0"}
{if $Staff->AccessAllowed()}
    {assign var="access" value="1"}
{/if}

{if $smarty.get.system }
     {assign var="system" value=$smarty.get.system}
{else}
     {assign var="system" value=$Staff->GetSystem(false)}
{/if}

{*-----------------------------------------------------------------------------------------------*}
{* header pairs *}
{* 'All' label *}
<span id='divTracks_1_selected' name='divTracks_1_selected' style='color:#ffffff;background-color:#477ab1;display:none'>
     {#_Tracks__labelAll#}
</span>

<span id='divTracks_1_normal'  name='divTracks_1_normal' style='display:none'>
     <a href='javascript:void(null);' onClick='javascript:xajax_showTracksPairLite(1, "{$access}", "{$system}");'>
          {#_Tracks__labelAll#}
     </a>
</span>
{* /'All' label *}
{*-----------------------------------------------------------------------------------------------*}
{foreach key="TradeID" name="pairs" item="itemPair" from=$pairsAllArr}

<span id='divTracks_{$itemPair.TradeID}_separator' style='display:none'>
	 &nbsp;|&nbsp;
</span>

<span id='divTracks_{$itemPair.TradeID}_normal' style='display:none'>
     <a href='javascript:void(null);' onClick='javascript:xajax_showTracksPairLite("{$itemPair.TradeID}","{$access}","{$system}", "1");'>
          {$itemPair.Pair}
     </a>
</span>

<span id='divTracks_{$itemPair.TradeID}_selected' style='color:#ffffff;background-color:#477ab1;display:none'>
     {$itemPair.Pair}
</span>

{/foreach}
{* /header pairs *}
{*-----------------------------------------------------------------------------------------------*}
<span id="hline" style="display:none"><hr></span>
<div style="height:18px">

	<div id="strobber" style="display:none"><img src="{#images_dir#}/loading.gif">&nbsp;{#page__LoadingLabel#}</div>

</div>
    <div id="divTracksMain">&nbsp;</div>


{*-----------------------------------------------------------------------------------------------*}
<script type="text/javascript">
<!--
xajax_showTracksPairLite('1','{$access}','{$system}','1', '0');
//setInterval("xajax_reloadTrackRecord()", 60000); // Auto update track record

// -->
</script>
{*-----------------------------------------------------------------------------------------------*}
<br>
